/**
 * Project		: anveshitha
 * Filename		: anveshitha.timer.AnveshithaTimerTask.java
 * Author		: varun
 * Date			: Jun 15, 2008, 11:59:01 PM
 * Description	: This has methods for scheduling timer tasks like scheduled indexing
 * License		: GNU LESSER GENERAL PUBLIC LICENSE (http://www.gnu.org/licenses/lgpl-3.0.txt)
 */
package anveshitha.timer;

import static anveshitha.config.AnveshithaConstants.JAVA;
import static anveshitha.config.AnveshithaConstants.TIMER_DELAYS;

import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;

import anveshitha.indexers.JavaSourceCodeIndexer;

/**
 * @author varun
 */
public class AnveshithaScheduler {

	private static Timer timer;
	private static TimerTask javaIndexerTask;
	
	public static void schedule()
	{
		javaIndexerTask = new JavaSourceCodeIndexer(true);
		
		timer = new Timer(true);
		timer.scheduleAtFixedRate(javaIndexerTask, new Date(), TIMER_DELAYS.get(JAVA));	
	}
}
